<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			.div1 {
				width: 200px;
				height: 100px;
				background-color: red;
				border-radius: 200px 200px 0 0;
				position: relative;
			}
			
			.div2 {
				width: 200px;
				height: 100px;
				background-color: brown;
				border-radius: 0 0 200px 200px;
				position: relative;
			}
			
			.suby1 {
				z-index: 10;
				width: 100px;
				height: 100px;
				background-color: brown;
				border-radius: 200px 200px 200px 200px;
				position: absolute;
				top: 50px;
			}
			
			.suby2 {
				width: 100px;
				height: 100px;
				background-color: red;
				border-radius: 200px 200px 200px 200px;
				position: absolute;
				top: -50px;
				right: 0px;
			}
			
			.y1 {
				z-index: 2;
				width: 40px;
				height: 40px;
				background-color: red;
				border-radius: 20px;
				position: absolute;
				right: 35px;
				top: 35px;
			}
			
			.y2 {
				z-index: 2;
				width: 40px;
				height: 40px;
				background-color: brown;
				border-radius: 20px;
				position: absolute;
				right: 35px;
				top: 35px;
			}
			
			.taiji {
				z-index: 2;
				width: 200px;
				height: 200px;
				border-radius: 50%;
				position: absolute;
				left: 0px;
				top: 0px;
				box-shadow: 0px 0px 20px #232FF0;
			}
		</style>
	</head>

	<body>
		<div class="taiji" style="left: 100px ;">

			<div class="div1">
				<div class="suby1">
					<div class="y1">

					</div>

				</div>
			</div>
			<div class="div2">
				<div class="suby2">
					<div class="y2">

					</div>

				</div>
			</div>
		</div>
		<button onclick="Divleft()">向右移动</button>
		<script type="text/javascript">
			var l = 0;
			var t = 0;
			var lrot = 10;
			var trot = 10;
			setInterval(function() {
				var tj = document.querySelector(".taiji");
				l = l + lrot;
				t = t + trot;
				if(l >= 1165) {
					lrot = -10;
				}
				if(l <= 0){
					lrot = 10;
                }
				if(t >= 563) {
					trot = -10;
				}
				if(t <= 0){
					trot = 10;
				}
				tj.style.left = l + "px";
				tj.style.top = t + "px";
			}, 20);
		</script>
	</body>

</html>